##### My (demuredemeanor) spectrwm.conf
# Uses tabstop=4; shiftwidth=4 tabs; foldmarker={{{,}}};
# https://notabug.org/demure/dotfiles/
# legacy repo http://github.com/demure/dotfiles

# PLEASE READ THE MAN PAGE BEFORE EDITING THIS FILE!
# http://opensource.conformal.com/cgi-bin/man-cgi?spectrwm

## Note:
# option[x]         = 1     # '[x]' will either mean screen or workspace 'x'

### Main Settings ### {{{
disable_border      = 1             # Disable border if one window and no bar
#border_width       = 1             # Set window border width
#verbose_layout     = 1
#focus_mode         = default

## Colors for focussed and unfocussed window borders
# NOTE: all colors in this file are in hex! see XQueryColor for examples
# color_focus       = red
# color_unfocus     = rgb:88/88/88  # Border color of unfocused window
# color_focus_maximized = xxx       # Border color of maximized window
### End Main ### }}}

### Bar Settings ### {{{
#bar_enabled        = 1             # Enable bar
#bar_enabled_ws[x]  = 1             # Enable bar in workspace [x]
#bar_border_width   = 1             # Bar boarder width
#bar_border[1]      = rgb:00/80/80  # Bar board color in screen [x]
#bar_color[1]       = black         # Bar background color in screen [x]
#bar_border_unfocus[1]  = xxx       # Bar unfocus color in in screen [x]

    ### Bar Font ### {{{
    #bar_font_color[1]  = rgb:a0/a0/a0
    bar_font_color[1]   = rgb:99/99/99
    bar_font            = Symbola:pixelsize=16:antialias=true
    #bar_font           = Terminus:pixelsize=14:antialias=true
    #bar_font           = Unifont:pixelsize=14:antialias=true
    #bar_font           = PragmataPro:pixelsize=12:antialias=true
    #bar_font           = PragmataPro:style=Regular:pixelsize=12:antialias=true
    ### End Font ### }}}

## Point at .../dotfiles/conky/spectrwm-conky by linking to ~/.conkyrc
bar_action          = conky
#bar_justify        = left          # Justify bar left/center/right. Non-left may break output
#bar_at_bottom      = 0             # Move bar to bottom
#stack_enabled      = 1             # Enable showing stack method in bar
#clock_enabled      = 1             # Enable clock in bar. Disable to let script do date
clock_format        = %a %d%b%Y %R# ## In strftime format. Note # location
#clock_format       = %a %b %d %R %Y
#title_name_enabled = 1             # Show active window title
#title_class_enabled    = 1         # Show active window classes
#window_name_enabled    = 0
#urgent_enabled     = 0             # Show urgent \a screens in bar. Too Big
#urgent_collapse    = 0             # Hides non-urgent. Makes smaller, still ~8 chars
### End Bar ### }}}

### Workspace Settings ### {{{
name ws[1]:comp
name ws[2]:dd
name ws[3]:web
name ws[4]:mail
name ws[7]:file
### End Workspace Settings ### }}}

### Application Settings ### {{{
    ### Spawn Apps ### {{{
    program[term]       = x-terminal-emulator
    program[screenshot_all] = /home/demure/bin/screenshot.sh full
    program[screenshot_wind]    = /home/demure/bin/screenshot.sh window
    program[lock]       = i3lock -c 2E3436
    program[file]       = spacefm
    #program[file]      = thunar
    program[office]     = libreoffice
    program[menu]       = rofi -sidebar-mode -modi "run,ssh" -show run -font 'Pragmata Pro 10' -fg \#505050 -bg \#000000 -bgalt \#101010 -hlfg \#008080 -hlbg \#000000 -bc \#008080 -bw 1 -location 2 -width 100 -de -padding 0 -lines 10 -no-disable-history -no-levenshtein-sort
    program[back-inc]   = xbacklight -inc 1
    program[back-dec]   = xbacklight -dec 1
    program[vol-inc]        = amixer set Master 1%+ >/dev/null
    program[vol-dec]    = amixer set Master 1%- >/dev/null
    #program[editor]    = gvim

        ### control-pianobar Commands ### {{{
        program[piano-play]     = ~/.config/pianobar/control-pianobar.sh play
        program[piano-quit]     = ~/.config/pianobar/control-pianobar.sh quit
        program[piano-hist]     = ~/.config/pianobar/control-pianobar.sh history
        program[piano-next]     = ~/.config/pianobar/control-pianobar.sh next
        program[piano-tired]    = ~/.config/pianobar/control-pianobar.sh tired
        program[piano-ss]       = ~/.config/pianobar/control-pianobar.sh switchstation
        program[piano-ps]       = ~/.config/pianobar/control-pianobar.sh previousstation
        program[piano-ns]       = ~/.config/pianobar/control-pianobar.sh nextstation
        program[piano-love]     = ~/.config/pianobar/control-pianobar.sh love
        program[piano-ban]      = ~/.config/pianobar/control-pianobar.sh ban
        program[piano-expl]     = ~/.config/pianobar/control-pianobar.sh explain
        program[piano-curr]     = ~/.config/pianobar/control-pianobar.sh current
        ### End control-pianobar Commandss ### }}}

        ### Example Apps ### {{{
        #program[menu]      = dmenu_run -fn $bar_font -nb $bar_color -nf $bar_font_color -sb $bar_border -sf $bar_color
        #program[initscr]   = initscreen.sh
        #spawn_term     = x-terminal-emulator
        ### End Exapmple ### }}}
    ### End Spawn ### }}}

# dialog box size ratio .3 >= r < 1
# dialog_ratio      = 0.6

# Split a non-Xrandr dual head setup into one region per monitor
# (non-standard driver-based multihead is not seen by spectrwm)
# region        = screen[1]:1280x1024+0+0
# region        = screen[1]:1280x1024+1280+0

    ### Auto run ### {{{
    ## Launch applications in a workspace of choice
    autorun     = ws[1]:x-terminal-emulator
    autorun     = ws[1]:stalonetray
    autorun     = ws[1]:nm-applet
    autorun     = ws[1]:clipit
    autorun     = ws[1]:cryptkeeper
    autorun     = ws[1]:volumeicon
    autorun     = ws[1]:dropbox start

    #autorun        = ws[2]:xxxterm http://www.openbsd.org
    autorun     = ws[3]:chromium
    autorun     = ws[4]:icedove
    autorun     = ws[7]:spacefm
    ### End Auto ### }}}

    ### Workspace Layout ### {{{
    #layout     = ws[1]:4:0:0:0:vertical
    #layout     = ws[2]:0:0:0:0:horizontal
    #layout     = ws[3]:0:0:0:0:fullscreen
    ### End Layout ### }}}
### End Application ### }}}

### Keys ### {{{

## Read https://github.com/conformal/spectrwm/blob/master/spectrwm.1
# to see all real defaults!!!

## Mod key, (windows key is Mod4) (apple key on OSX is Mod2)
modkey = Mod4

## Clear key bindings and load new key bindings from the specified file.
# This allows you to load pre-defined key bindings for your keyboard layout.
#keyboard_mapping = ~/.spectrwm_us.conf

    ### Bindings ### {{{
        ### Added Bindings ### {{{
        bind[back-inc]      = MOD+o
        bind[back-dec]      = MOD+i
        bind[vol-inc]       = MOD+Shift+o
        bind[vol-dec]       = MOD+Shift+i

            ### control-pianobar Keys ### {{{
            bind[piano-play]        = MOD+F12
            bind[piano-quit]        = MOD+F11
            bind[piano-hist]        = MOD+F9
            bind[piano-next]        = MOD+F1
            bind[piano-tired]       = MOD+F2
            bind[piano-ss]          = MOD+F7
            #bind[piano-ps]         = MOD+F
            #bind[piano-ns]         = MOD+F
            bind[piano-love]        = MOD+F3
            bind[piano-ban]         = MOD+F5
            #bind[piano-expl]       = MOD+F
            bind[piano-curr]        = MOD+F8
            ### End control-pianobar Keys ### }}}
        ### End Added ###}}}
    ## Unbind with: bind[]  = <keys>
    #bind[term]             = MOD+Shift+Return
    bind[menu]              = MOD+p
    #bind[quit]             = MOD+Shift+q
    #bind[restart]          = MOD+q
    #bind[cycle_layout]     = MOD+space
    #bind[flip_layout]      = MOD+Shift+\
    #bind[stack_reset]      = MOD+Shift+space
    #bind[master_shrink]    = MOD+h
    #bind[master_grow]      = MOD+l
    #bind[master_add]       = MOD+comma
    #bind[master_del]       = MOD+period
    #bind[stack_inc]        = MOD+Shift+comma
    #bind[stack_dec]        = MOD+Shift+period
    #bind[swap_main]        = MOD+Return
    #bind[focus_next]       = MOD+j, MOD+Tab
    #bind[focus_prev]       = MOD+k, MOD+Shift+Tab
    #bind[focus_main]       = MOD+m
    #bind[swap_next]        = MOD+Shift+j,
    #bind[swap_prev]        = MOD+Shift+k,
    #bind[bar_toggle]       = MOD+b
    #bind[bar_toggle_ws]    = MOD+Shift+b
    #bind[wind_del]         = MOD+c
    #bind[wind_kill]        = MOD+Shift+c
    #bind[ws_1]             = MOD+1
    #bind[ws_2]             = MOD+2
    #bind[ws_3]             = MOD+3
    #bind[ws_4]             = MOD+4
    #bind[ws_5]             = MOD+5
    #bind[ws_6]             = MOD+6
    #bind[ws_7]             = MOD+7
    #bind[ws_8]             = MOD+8
    #bind[ws_9]             = MOD+9
    #bind[ws_10]            = MOD+0
    #bind[mvws_1]           = MOD+Shift+1
    #bind[mvws_2]           = MOD+Shift+2
    #bind[mvws_3]           = MOD+Shift+3
    #bind[mvws_4]           = MOD+Shift+4
    #bind[mvws_5]           = MOD+Shift+5
    #bind[mvws_6]           = MOD+Shift+6
    #bind[mvws_7]           = MOD+Shift+7
    #bind[mvws_8]           = MOD+Shift+8
    #bind[mvws_9]           = MOD+Shift+9
    #bind[mvws_10]          = MOD+Shift+0
    ## MISSING rg_
    ## MISSING mvrg_
    #bind[ws_next]          = MOD+Right
    #bind[ws_prev]          = MOD+Left
    #bind[ws_next_all]      = MOD+Up
    #bind[ws_prev_all]      = MOD+Down
    #bind[ws_next_move]     = MOD+a
    #bind[ws_prev_move]     = MOD+Shift+Left
    #bind[ws_prior]         = MOD+Shift+Up
    #bind[rg_next]          = MOD+Shift+Right
    #bind[rg_prev]          = MOD+Shift+Left
    bind[screenshot_all]    = MOD+s
    bind[screenshot_wind]   = MOD+Shift+s
    #bind[version]          = MOD+Shift+v
    #bind[float_toggle]     = MOD+t
    #bind[lock]             = MOD+Shift+Delete
    #bind[initscr]          = MOD+Shift+i
    #bind[iconify]          = MOD+w
    #bind[uniconify]        = MOD+Shift+w
    #bind[maximize_toggle]  = MOD+e
    #bind[always_raise]     = MOD+Shift+r
    #bind[button2]          = MOD+v
    #bind[width_shrink]     = MOD+-
    #bind[width_grow]       = MOD+=
    #bind[height_shrink]    = MOD+Shift+-
    #bind[height_grow]      = MOD+Shift+=
    #bind[move_left]        = MOD+[
    #bind[move_right]       = MOD+]
    #bind[move_up]          = MOD+Shift+[
    #bind[mode_down]        = MOD+Shift+]
    #bind[name_workspace]   = MOD+Shift+/
    #bind[search_workspace] = MOD+/
    #bind[search_win]       = MOD+f

    ### End Binds ### }}}
### End Keys ### }}}

### Quirks ### {{{
## Remove with: quirk[class:name] = NONE
    ### Video Quriks ### {{{
    quirk[MPlayer:xv]   = FLOAT + FULLSCREEN + FOCUSPREV
    quirk[mpv:xv]       = FLOAT + FULLSCREEN + FOCUSPREV
    quirk[mpv:gl]       = FLOAT + FULLSCREEN + FOCUSPREV
    quirk[SMPlayer:xv]  = FLOAT + FULLSCREEN + FOCUSPREV
    quirk[Vlc:vlc]      = FLOAT + FULLSCREEN + FOCUSPREV
    ### End Video ### }}}

quirk[Clipit:clipit]                = FLOAT + IGNORESPAWNWS
quirk[Gimp:gimp]                    = FLOAT + ANYWHERE
quirk[stalonetray:stalonetray]      = WS[1] + FLOAT + ANYWHERE + NOFOCUSONMAP
quirk[feh:feh]  = FLOAT + ANYWHERE

    ### Example Quirks ### {{{
    #quirk[OpenOffice.org 2.4:VCLSalFrame]  = FLOAT
    #quirk[OpenOffice.org 3.0:VCLSalFrame]  = FLOAT
    #quirk[OpenOffice.org 3.1:VCLSalFrame]  = FLOAT
    #quirk[Firefox-bin:firefox-bin]         = TRANSSZ
    #quirk[Firefox:Dialog]                  = FLOAT
    #quirk[XTerm:xterm]                     = XTERM_FONTADJ
    #quirk[xine:Xine Window]                = FLOAT + ANYWHERE
    #quirk[Xitk:Xitk Combo]                 = FLOAT + ANYWHERE
    #quirk[xine:xine Panel]                 = FLOAT + ANYWHERE
    #quirk[Xitk:Xine Window]                = FLOAT + ANYWHERE
    #quirk[xine:xine Video Fullscreen Window] = FULLSCREEN + FLOAT
    #quirk[pcb:pcb]                         = FLOAT
    ### End Example ###}}}
### End Quirks ### }}}

## EXAMPLE: define firefox program and bind to key
#program[firefox]   = firefox http://spectrwm.org/
#bind[firefox]      = MOD+Shift+b
